package com.iweb.address.service;

import com.iweb.address.dao.AddressDao;
import com.iweb.address.dao.AddressDaoImpl;
import com.iweb.address.model.Address;
import com.iweb.util.PageModel;

import java.util.List;

public class AddressServiceImpl implements AddressService {
    AddressDao addressDao = new AddressDaoImpl();

    @Override
    public List<Address> selectByPage(PageModel pageModel, Integer userid) {
        return addressDao.selectByPage(pageModel, userid);
    }

    @Override
    public Address queryByUserId(Integer userid) {
        return addressDao.queryByUserId(userid);
    }

    @Override
    public int saveOne(Address address) {
        return addressDao.saveOne(address);
    }

    @Override
    public int deleteById(Integer addressid) {
        return addressDao.deleteById(addressid);
    }

    @Override
    public int updateById(Address address) {
        return addressDao.updateById(address);
    }

    @Override
    public Address queryByAddressId(Integer addressid) {
        return addressDao.queryByAddressId(addressid);
    }
}
